The present invention relates to the field of enumerating devices within a bus structure. More particularly, the present invention relates to the field of dynamically enumerating devices within a bus structure after a bus reset.
The IEEE standard, xe2x80x9cIEEE 1394 Standard For A High Performance Serial Bus,xe2x80x9d Draft ratified in 1995, is an international standard for implementing an inexpensive high-speed serial bus architecture which supports both asynchronous and isochronous format data transfers. Isochronous data transfers are real-time transfers which take place such that the time intervals between significant instances have the same duration at both the transmitting and receiving applications. Each packet of data transferred isochronously is transferred in its own time period. The IEEE 1394-1995 standard bus architecture provides multiple channels for isochronous data transfer between applications. A six bit channel number is broadcast with the data to ensure reception by the appropriate application. This allows multiple applications to simultaneously transmit isochronous data across the bus structure. Asynchronous transfers are traditional data transfer operations which take place as soon as possible and transfer an amount of data from a source to a destination.
The IEEE 1394-1995 standard provides a high-speed serial bus for interconnecting digital devices thereby providing a universal I/O connection. The IEEE 1394-1995 standard defines a digital interface for the applications thereby eliminating the need for an application to convert digital data to analog data before it is transmitted across the bus. Correspondingly, a receiving application will receive digital data from the bus, not analog data, and will therefore not be required to convert analog data to digital data. The cable required by the IEEE 1394-1995 standard is very thin in size compared to other bulkier cables used to connect such devices. Devices can be added and removed from an IEEE 1394-1995 bus while the bus is active. If a device is so added or removed the bus will then automatically reconfigure itself for transmitting data between the then existing nodes. A node is considered a logical entity with a unique address on the bus structure. Each node provides an identification ROM, a standardized set of control registers and its own address space.
Each node on the IEEE 1394-1995 bus structure has a 16 bit node ID. The node ID is the address that is used for data transmission on the data link layer. This allows address space for potentially up to 64K nodes on the bus structure. The node ID is divided into two smaller fields: the higher order 10 bits specify a bus ID and the lower order 6 bits specify a physical ID. The bus ID is assigned by a root node and the physical ID is assigned during a self identify sequence upon reset of the bus. Each physical ID field is unique within a single IEEE 1394-1995 bus, but the physical ID field is not a fixed value for each node itself. The physical ID field is fixed for the position of the node within the bus structure. If a device is moved from one position in the IEEE 1394-1995 bus to another position within the same IEEE 1394-1995 bus, the device will have a different node ID because its physical ID will have a different value when in the new position.
Within each of the bus ID and physical ID fields a value of all logical xe2x80x9c1xe2x80x9ds is reserved for special purposes. Accordingly, this addressing scheme provides for up to 1023 busses, each with 63 independently addressable nodes. Each IEEE 1394-1995 compatible device includes a node unique ID which is a 64 bit number saved within a configuration read-only memory (ROM) of the device. The node unique ID is permanent for each device and does not depend on the position of the device within an IEEE 1394-1995 bus. The node unique ID is not used for addressing of data transmissions on the data link layer.
The IEEE 1394-1995 standard defines a protocol as illustrated in FIG. 1. This protocol includes a serial bus management block 10 coupled to a transaction layer 12, a link layer 14 and a physical layer 16. The physical layer 16 provides the electrical and mechanical connection between a device or application and the IEEE 1394-1995 cable. The physical layer 16 also provides arbitration to ensure that all devices coupled to the IEEE 1394-1995 bus have access to the bus as well as actual data transmission and reception. The link layer 14 provides data packet delivery service for both asynchronous and isochronous data packet transport. This supports both asynchronous data transport, using an acknowledgement protocol, and isochronous data transport, providing real-time guaranteed bandwidth protocol for just-in-time data delivery. The transaction layer 12 supports the commands necessary to complete asynchronous data transfers, including read, write and lock. The serial bus management block 10 contains an isochronous resource manager for managing isochronous data transfers. The serial bus management block 10 also provides overall configuration control of the serial bus in the form of optimizing arbitration timing, guarantee of adequate electrical power for all devices on the bus, assignment of the cycle master, assignment of isochronous channel and bandwidth resources and basic notification of errors.
A bus reset occurs when the bus is somehow reconfigured, either by the removal of a node from the bus or the addition of a node to the bus or when a device attached to the bus is powered off. When a bus reset occurs, all nodes are forced into a special state that clears all topology information and starts a next phase. After a bus reset, the only information known to a node is whether the node is a branch node, a leaf node or an isolated node. A branch node has more than one directly connected neighbor. A leaf node has only a single neighbor. An isolated node is unconnected. After a bus reset, a tree identification process is performed. During the tree identification process, the general network topology is determined and translated into a tree. One node within the network is designated as a root node and all of the physical connections are associated with a direction pointing towards the root node. From each port it is determined if there is a connection and if the connection is to a child or parent node. The direction is set by labeling each connected port as either a parent port or a child port. A parent port is a port connected to a node closer to the root than the reporting node. A child port is a port connected to a node further from the root than the reporting node. From these relationships, the root node determines the physical topology of the devices connected to the IEEE 1394-1995 serial bus network.
After the tree identification process, a self identifying process is performed. During the self identifying process, each node connected to the IEEE 1394-1995 serial bus network selects a unique physical ID, in order, and transmits that physical ID and other management information to the other nodes on the bus. The physical ID is a number equal to the count of the number of times since the reset event that a node has passed through the state of receiving self identifying information before having its own opportunity to send self identifying information. This self identifying process allows a node connected to the IEEE 1394-1995 serial bus network to be aware of the other nodes connected to the bus.
A controlling or monitoring application is an application that is resident on a node and is used to monitor, control or interact with the other nodes coupled to the IEEE 1394-1995 serial bus network. Generally, such a controlling or monitoring application maintains a representation or object of each device. This object represents the capabilities of the device. This object is typically copied from a library of objects representing known devices. However, if a new device, without a representative object in the library, is connected to the network, the controlling or monitoring application is at a loss for representing this new device. This can result in the controlling or monitoring application being unable to monitor or interact with the new device.
A reset event signifies to the controlling or monitoring application that the status of the bus and the nodes connected to it has changed. This requires the controlling or monitoring application to somehow update its information regarding the devices connected to the serial bus network. This can be a significant endeavor. There is currently a lack of efficient apparatus and methods for updating information for nodes on a serial bus network after a bus reset. No solutions for handling the updating of device information after a bus reset is described in any of the IEEE 1394 standards documents.
A controlling application utilizes existing handle objects, as appropriate, to reconfigure objects to dynamically enumerate and represent devices coupled to a serial bus network after a bus reset event. Preferably, the serial bus network is an IEEE 1394-1995 serial bus network. During a self-identifying process, after the bus reset, information about the characteristics of the devices within the network is received. From this self-identifying information objects representing the devices are generated. Existing handle objects from a previous bus configuration are then compared to these objects. If a handle matches an object, then a pointer value within the handle is changed to point to an address of the object. Preferably, a handle includes a 64 bit unique identifier value that is compared to the objects to find a match. For devices removed from the network, the handle object is preferably never discarded but is made invalid. For devices added to the network, existing invalid handle objects are preferably re-validated and attached to objects representing devices. If there are no further existing handles and a device does not yet have an attached handle, then a handle is generated and attached to the device. A handle is only generated if there are more devices within the network than there are existing handles. To generate an object representing a device, subobjects for each subunit within the device are assembled into the object representing the device. When the unit reports its self-identifying information, the controlling application determines which subunits are included within the unit. Subobjects representing these subunits are copied from a subobject library and assembled into the object representing this device. Preferably, a handle includes a pointer value pointing to an address of the corresponding object for the device.
In one aspect of the invention, a method of dynamically enumerating devices within a network comprises the steps of comparing self identifying information for each device within the network to one or more existing handle objects and reconfiguring the existing handle objects to correspond to the devices within the network after a bus reset, wherein valid handle objects are associated with device objects generated after the bus reset. The valid handle objects each include a pointer value pointing to an address of a corresponding device object after the bus reset. Each device object represents characteristics of a corresponding device. The method further comprises the step of receiving self identifying information for each device within the network. The method further comprises the step of generating the device objects for each device within the network. The network is preferably an IEEE 1394 serial bus network.
In another aspect of the present invention, an apparatus for dynamically enumerating devices within a network comprises means for comparing self identifying information for each device within the network to one or more existing handle objects and means for reconfiguring coupled to the means for comparing for reconfiguring the existing handle objects to correspond to the devices within the network after a bus reset, wherein valid handle objects are associated with device objects generated after the bus reset. The apparatus further comprises an interface circuit coupled to the means for comparing to receive the self identifying information from the devices within the network. Each handle includes a pointer value corresponding to an address of a corresponding device object. Each device object represents characteristics of a corresponding device. The network is preferably an IEEE 1394 serial bus network.
In still another aspect of the present invention, a network comprises a plurality of devices coupled together, each of the devices includes an interface circuit through which communications are transmitted and received, and a processing circuit coupled to the interface circuit to process communications received through the interface circuit and a control application resident on one of the devices to maintain representations of the devices, wherein the representations are reconfigured by the control application after a bus reset using existing handles existing before the bus reset which correspond to devices remaining after the bus reset. The representations include device objects each representing characteristics of a corresponding device. Each handle includes a pointer value corresponding to an address of a corresponding device object. The network is preferably an IEEE 1394 serial bus network.
In yet another aspect of the present invention, a method of dynamically enumerating a device within a network comprises the steps of determining characteristics of a device, generating a device object for the device, determining if an existing valid handle matches the characteristics of the device, wherein the existing valid handle includes a pointer value and changing the pointer value to an address of the device object if the existing valid handle matches the characteristics of the device. The existing valid handle further includes a unique ID value of the device. The step of determining if any existing valid handle matches the characteristics of the device compares the unique ID value of the device to the unique ID value stored in the handle. The method further comprises the step of repeating the above steps for each device within the network. For a new device added to the network, an existing invalid handle is re-validated and associated with a corresponding device object, if the existing invalid handle is available. If no existing invalid handle is available, a new handle is generated for and associated with the new device. For a device removed from the network, a corresponding handle is changed to an invalid handle. Each device object represents characteristics of a corresponding device. The method further comprises the step of receiving self-identifying information for the device. The network is preferably an IEEE 1394 serial bus network.